package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.TRegisterDept;
import com.ruoyi.business.mapper.TRegisterDeptMapper;
import com.ruoyi.business.service.ITRegisterDeptService;
import com.ruoyi.business.vo.TRegisterDeptVo;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 进修科室Service业务层处理
 *
 * @author Tellsea
 * @date 2024-01-17
 */
@Service
public class TRegisterDeptServiceImpl extends ServiceImpl<TRegisterDeptMapper, TRegisterDept> implements ITRegisterDeptService {

    @Override
    public TableDataInfo<TRegisterDeptVo> queryList(TRegisterDeptVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<TRegisterDeptVo> queryAll(TRegisterDeptVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public TRegisterDeptVo queryById(Long id) {
        return this.baseMapper.queryById(id);
    }

    @Override
    public String getMaxDeptNumber() {
        return this.baseMapper.getMaxDeptNumber();
    }
}
